package com.repair.worker.service;

import com.repair.api.user.response.data.UserInfo;
import com.repair.api.worker.request.WorkerAuthRealNameRequest;
import com.repair.api.worker.request.WorkerBlockRequest;
import com.repair.api.worker.request.WorkerQueryPageRequest;
import com.repair.api.worker.request.WorkerRegisterRequest;
import com.repair.api.worker.request.param.WorkerBlockParam;
import com.repair.api.worker.request.param.WorkerQueryParam;
import com.repair.api.worker.request.param.WorkerRealNameAuthParam;
import com.repair.api.worker.response.WorkerOperateResponse;
import com.repair.api.worker.response.WorkerQueryResponse;
import com.repair.api.worker.response.data.WorkerInfo;
import com.repair.base.response.PageResponse;
import com.repair.worker.pojo.dto.WorkerUpdateParam;
import com.repair.worker.pojo.entity.Worker;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author 张强
 * @since 2024-09-13
 */
public interface WorkerService extends IService<Worker> {
    //根据手机查询
    Worker selectByPhone(String phone);

    //定义师傅登陆注册
    WorkerOperateResponse register(WorkerRegisterRequest workerRegisterRequest);

    PageResponse<WorkerInfo> getAllWorkers(WorkerQueryPageRequest<WorkerQueryParam> queryParam);

    //根据id查询worker
    Worker getWorkerById(Long id);

    WorkerInfo selectWorkerInfo(Long workerId);

    void updateWorkerAuth(WorkerAuthRealNameRequest<WorkerRealNameAuthParam> request);

    WorkerQueryResponse<Boolean> blockWorker(WorkerBlockRequest<WorkerBlockParam> param);
    WorkerQueryResponse<Boolean> cancelBlockWorker(WorkerBlockRequest<WorkerBlockParam> param);
    void updateWorkerNickName(WorkerUpdateParam workerUpdateParam);

    void uploadWorkerProfile(WorkerUpdateParam workerUpdateParam);
}
